// Author: combacsa@kaist.ac.kr
// http://www.jungol.co.kr/prog/Hanal/hanalView.php?qs_code=1044

//#define COMPILE
#ifdef COMPILE

#include <fstream>

using namespace std;

int min_num, max_num;

void input() {
    ifstream in("input.txt");
    in >> min_num;
    max_num = min_num;
    for (int i = 1; i < 10; i++) {
        int a;
        in >> a;
        if (a > max_num)
            max_num = a;
        else if (a < min_num)
            min_num = a;
    }
    
    in.close();
}

void output() {
    ofstream out("output.txt");
    
    out << max_num - min_num;
    
    out.close();
}

int main() {
    input();
    
    
    output();
    return 0;
}


#endif
